<?php
class Tentativo extends AppModel {
	var $name = 'Tentativo';
	var $useTable = 'tentativos';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'curso_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'hora_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'dia_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
	);

	var $belongsTo = array(
		'Curso' => array(
			'className' => 'Curso',
			'foreignKey' => 'curso_id'
		),
		'Hora' => array(
			'className' => 'Hora',
			'foreignKey' => 'hora_id'
		),
		'Dia' => array(
			'className' => 'Dia',
			'foreignKey' => 'dia_id'
		)
	);
}
?>